package dao;

import java.util.List;

import org.hibernate.Session;

import modele.Catcompta;


import persistence.BaseDAO;

public class CatcomptaDAO{
	
	public static void ajouterCatcompta(Catcompta catcompta, Session session) throws Exception{
		BaseDAO.getInstance().ajouter(catcompta,session);
	}

	public static void modifierCatcompta(Catcompta catcompta, Session session) {
		BaseDAO.getInstance().modifier(catcompta,session);
	}

	public static void SupprimerCatcompta(Catcompta catcompta, Session session) {
		BaseDAO.getInstance().delete(catcompta,session);
	}

	public static void getCatcompta(int id, Session session) {
		BaseDAO.getInstance().getObject(Catcompta.class, id,session);
	}

	public static List getListCatcompta(String requette, Session session) {
		return BaseDAO.getInstance().getListObject(requette,session);
	}

	public static List getListCatcompta(String requete, Session session,
			int firstResult, int maxResults) {
		return BaseDAO.getInstance().getLimitedListObject(requete, firstResult, maxResults, session);
	}
}
